package com.neusoft.neuiotms.common.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.Proxy;

import com.neusoft.bizcore.web.jpa.model.AbstractAuditModel;
import com.neusoft.bizcore.web.jpa.model.Comment;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
@Entity
@org.hibernate.annotations.Table(appliesTo = "neuiot_serial_number", comment = "序列号表")
@Table(name = "neuiot_serial_number")
@Proxy(lazy = false)
public class SerialNumber extends AbstractAuditModel {

    private static final long serialVersionUID = 1L;

    /** 模块名称 */
    @Column(length = 255)
    private String moduleName;

    /** 模块编码 */
    @Column(length = 255, unique = true)
    private String moduleCode;

    /** 流水号配置模板 */
    @Column(length = 255, nullable = false)
    private String configTemplet;

    /** 序列号最大值 */
    @Comment("int(11) NULL COMMENT '序列号最大值'")
    private Integer maxSerial = 0;

    /** 是否自动增长标识 */
    @Comment("bit NOT NULL COMMENT '是否自动增长（0 否 1 是）'")
    private Boolean autoIncrement = false;

    /** 预生成流水号数量 */
    @Comment("int(11) NULL COMMENT '预生成流水号数量'")
    private Integer preMaxNum = 100;

}
